\subsection{Introduction}
\begin{definition}
	If \( f \colon [a,b] \subset \mathbb R \to \mathbb C \) is a complex function, and the real and imaginary parts of \( f \) are Riemann integrable, then we define
	\[
		\int_a^b f(t) \dd{t} = \int_a^b \Re(f(t)) \dd{t} + i \int_a^b \Im(f(t)) \dd{t}
	\]
	In particular, for \( g \colon [a,b] \to \mathbb R \), we have
	\[
		\int_a^b ig(t) \dd{t} = i\int_a^b g(t) \dd{t}
	\]
	Thus, for a complex constant \( w \in \mathbb C \), we can find
	\[
		\int_a^b wf(t) \dd{t} = w \int_a^b f(t) \dd{t}
	\]
\end{definition}
\begin{proposition}[basic estimate]
	If \( f \colon [a,b] \to \mathbb C \) is continuous, then
	\[
		\abs{\int_a^b f(t) \dd{t}} \leq \int_a^b \abs{f(t)} \dd{t} \leq (b-a) \sup_{t \in [a,b]} \abs{f(t)}
	\]
	Equality holds if and only if \( f \) is constant.
\end{proposition}
\begin{proof}
	If \( \int_a^b f(t) \dd{t} = 0 \) then the proof is complete.
	Otherwise, we can write the value of the integral as \( re^{i\theta} \) for \( \theta \in [0, 2\pi) \).
	Let \( M = \sup_{t \in [a,b]} \abs{f(t)} \).
	Then we have
	\begin{align*}
		\abs{\int_a^b f(t) \dd{t}} & = r                                                                                \\
		                           & = e^{-i\theta} \int_a^b f(t) \dd{t}                                                \\
		                           & = \int_a^b e^{-i\theta} f(t) \dd{t}                                                \\
		                           & = \int_a^b \Re(e^{-i\theta} f(t)) \dd{t} + i \int_a^b \Im(e^{-i\theta} f(t)) \dd{t}
	\end{align*}
	Since the left hand side is real, the imaginary integral vanishes.
	\begin{align*}
		\abs{\int_a^b f(t) \dd{t}} & = \int_a^b \Re(e^{-i\theta} f(t)) \dd{t}                                  \\
		                           & \leq \int_a^b \abs{e^{-i\theta} f(t)} \dd{t} = \int_a^b \abs{f(t)} \dd{t} \\
		                           & \leq (b-a)M
	\end{align*}
	Equality holds if and only if \( \abs{f(t)} = M \) and \( \Re(e^{-i\theta} f(t)) = M \) for all \( t \in [a,b] \), which is true only if \( \abs{f(t)} = M \) and \( \arg(f(t)) = \theta \) hence \( f = Me^{i\theta} \) for all \( t \).
\end{proof}

\subsection{Integrating along curves}
\begin{definition}
	Let \( U \subset \mathbb C \) be an open set and let \( f \colon U \to \mathbb C \) be continuous.
	Let \( \gamma \colon [a,b] \to U \) be a \( C^1 \) curve.
	Then the \textit{integral of \( f \) along \( \gamma \)} is
	\[
		\int_\gamma f(z) \dd{z} = \int_a^b f(\gamma(t)) \gamma'(t) \dd{t}
	\]
\end{definition}
This definition is consistent with the previous definition of the integral of a function \( f \) along the interval \( [a,b] \).
The integral along a curve has various convenient properties.
\begin{enumerate}
	\item It is invariant under the choice of parametrisation.
	      Let \( \varphi \colon [a_1, b_1] \to [a,b] \) be \( C^1 \) and injective with \( \varphi(a_1) = a \) and \( \varphi(b_1) = b \).
	      Let \( \delta = \gamma \circ \varphi \colon [a_1, b_1] \to U \).
	      Then
	      \[
		      \int_\delta f(z) \dd{z} = \int_\gamma f(z) \dd{z}
	      \]
	      Indeed,
	      \begin{align*}
		      \int_\delta f(z) \dd{z} & = \int_{a_1}^{b_1} f(\gamma (\varphi(t))) \gamma'(\varphi(t)) \varphi'(t) \dd{t} \\
		                              & = \int_a^b f(\gamma(s)) \gamma'(s) \dd{s}                                        \\
		                              & = \int_\gamma f(z) \dd{z}
	      \end{align*}
	\item The integral is linear.
	      It is easy to check that
	      \[
		      \int_\gamma (\lambda f(z) + \mu g(z)) \dd{z} = \lambda \int_\gamma f(z) \dd{z} + \mu \int_\gamma g(z) \dd{z}
	      \]
	      for complex constants \( \lambda, \mu \in \mathbb C \).
	\item The additivity property states that if \( \gamma \colon[a,b] \to U \) is \( C^1 \) and \( a < c < b \), then
	      \[
		      \int_\gamma f(z) \dd{z} = \int_{\eval{\gamma}_{[a,c]}} f(z) \dd{z} + \int_{\eval{\gamma}_{c,b}} f(z) \dd{z}
	      \]
	\item We define the \textit{inverse path} \( (-\gamma) \colon [-b, -a] \to U \) by \( (-\gamma)(t) = \gamma(-t) \).
	      Then
	      \[
		      \int_{(-\gamma)} f(z) \dd{z} = - \int_\gamma f(z) \dd{z}
	      \]
\end{enumerate}
\begin{definition}
	Let \( \gamma \colon [a,b] \to \mathbb C \) be a \( C^1 \) curve.
	Then the \textit{length} of \( \gamma \) is
	\[
		\mathrm{length}(\gamma) = \int_a^b \abs{\gamma'(t)} \dd{t}
	\]
\end{definition}
\begin{definition}
	A \textit{piecewise \( C^1 \) curve} is a continuous map \( \gamma \colon [a,b] \to \mathbb C \) such that there exists a finite subdivision
	\[
		a = a_0 < a_1 < \dots < a_n = b
	\]
	such that each \( \gamma_j = \eval{\gamma}_{[a_{j-1}, a_j]} \) is \( C^1 \) for \( 1 \leq j \leq n \).
	Then, for such a piecewise \( C^1 \) curve, we define
	\[
		\int_\gamma f(z) \dd{z} = \sum_{j=1}^n \int_{\gamma_j} f(z) \dd{z}
	\]
	and
	\[
		\mathrm{length}(\gamma) = \sum_{j=1}^n \mathrm{length}(\gamma_j) = \sum_{j=1}^n \int_{a_{j-1}}^{a_j} \abs{\gamma'(t)} \dd{t}
	\]
	By the additivity property, both definitions are invariant under changing the subdivision.
	From here, we will use `curve' to refer to `piecewise \( C^1 \) curve', unless stated otherwise.
\end{definition}
\begin{definition}
	If \( \gamma_1 \colon [a,b] \to \mathbb C \) and \( \gamma_2 \colon [c,d] \) are curves with \( \gamma_1(b) = \gamma_2(c) \), we define the \textit{sum} of \( \gamma_1 \) and \( \gamma_2 \) to be the curve
	\[
		(\gamma_1 + \gamma_2) \colon [a,b+d-c] \to \mathbb C;\quad (\gamma_1 + \gamma_2)(t) = \begin{cases}
			\gamma_1(t)         & a \leq t \leq b         \\
			\gamma_2(t - b + c) & b \leq t \leq b + d - c
		\end{cases}
	\]
\end{definition}
\begin{proposition}
	Let \( f \colon U \to \mathbb C \) be continuous and \( \gamma \colon [a,b] \to \mathbb C \), we have
	\[
		\abs{\int_\gamma f(z) \dd{z}} \leq \mathrm{length}(\gamma) \sup_\gamma \abs{f}
	\]
	where \( \sup_\gamma g \equiv \sup_{t \in [a,b]} g(\gamma(t)) \).
\end{proposition}
\begin{proof}
	If \( \gamma \) is \( C^1 \), then
	\[
		\abs{\int_\gamma f(z) \dd{z}} = \abs{\int_a^b f(\gamma(t)) \gamma'(t) \dd{t}} \leq \int_a^b \abs{f(\gamma(t))} \cdot \abs{\gamma'(t)} \dd{t} \leq \sup_{t \in [a,b]} \abs{f(\gamma(t))} \mathrm{length}(\gamma)
	\]
	If \( \gamma \) is piecewise \( C^1 \), then the result follows from the definition of a piecewise \( C^1 \) function and the above.
\end{proof}

\subsection{Fundamental theorem of calculus}
\begin{theorem}[fundamental theorem of calculus]
	Let \( f \colon U \to \mathbb C \) be continuous on an open set \( U \subset \mathbb C \).
	Let \( F \colon U \to \mathbb C \) be a function such that \( F'(z) = f(z) \) for all \( z \in U \).
	Then, for any curve \( \gamma \colon [a,b] \to U \), we have
	\[
		\int_\gamma f(z) \dd{z} = F(\gamma(b)) - F(\gamma(a))
	\]
	If \( \gamma \) is a closed curve, then \( \int_\gamma f(z) = 0 \).
	Such a function \( F \) is known as an \textit{antiderivative} of \( f \).
\end{theorem}
\begin{proof}
	\[
		\int_\gamma f(z) \dd{z} = \int_a^b f(\gamma(t)) \gamma'(t) \dd{t} = \int_a^b \dv{t} F(\gamma(t)) \dd{t} = F(\gamma(b)) - F(\gamma(a))
	\]
\end{proof}
\begin{remark}
	Note that we assume that \( F \) exists such that \( F'(z) = f(z) \); such an \( F \) is not provided for by the theorem.
\end{remark}
\begin{example}
	For an integer \( n \) and the curve \( \gamma(t) = Re^{2\pi it} \) for \( t = [0,1] \), consider the integral \( \int_\gamma z^n \dd{z} \).
	For \( n \neq -1 \), the function \( \frac{z^{n+1}}{n+1} \) is an antiderivative of \( z^n \).
	Hence, \( \int_\gamma z^n \dd{z} = 0 \) since \( \gamma \) is a closed curve.
	If \( n = -1 \), we can use the definition of the integral to find
	\[
		\int_\gamma \frac{1}{z} \dd{z} = \int_0^1 \frac{1}{\gamma(t)} \gamma'(t) \dd{t} = \int_0^1 \frac{1}{Re^{2\pi i t}}2\pi i R e^{2 \pi i t} \dd{t} = 2 \pi i
	\]
	This is not zero, hence for all \( R > 0 \), \( \frac{1}{z} \) has no antiderivative in any open set containing the circle \( \qty{\abs{z} = R} \).
	In particular, for any branch of logarithm \( \lambda \), it has derivative \( \frac{1}{z} \), hence there exists no branch of logarithm on \( \mathbb C^\star = \mathbb C \setminus \qty{0} \).
\end{example}
\begin{theorem}[converse to fundamental theorem of calculus]
	Let \( U \subset \mathbb C \) be a domain.
	If \( f \colon U \to \mathbb C \) is continuous and if \( \int_\gamma f(z) \dd{z} = 0 \) for every closed curve \( \gamma \) in \( U \), then \( f \) has an antiderivative.
	In other words, there exists a holomorphic function \( F \colon U \to \mathbb C \) such that \( F' = f \) in \( U \).
\end{theorem}
\begin{proof}
	Let \( a_0 \in U \).
	Then for \( w \in U \), we can define
	\[
		F(w) = \int_{\gamma_w} f(z) \dd{z}
	\]
	where \( \gamma_w \colon [0,1] \to \mathbb C \) is a curve with \( \gamma_w(0) = a_0 \) and \( \gamma_w(1) = w \).

	The definition of \( F \) is independent of the choice of \( \gamma_w \).
	Indeed, suppose two paths \( \gamma_w, \gamma_w' \) exist.
	Then the curve \( \gamma_w + (-\gamma_w') \) is a closed path, and by assumption the integral along this curve is zero.
	Thus \( F \) is independent of the choice of path as claimed.
	So \( F \) is a well-defined function.

	Now, let \( w \in U \).
	Since \( U \) is an open set, there exists \( r > 0 \) such that \( D(w,r) \subset U \).
	For \( h \in \mathbb C \) with \( 0 < \abs{h} < r \), let \( \delta_h \) be the radial path \( t \mapsto w + th \) for \( t \in [0,1] \).
	Now we define
	\[
		\gamma = \gamma_w + \delta_h + (-\gamma_{w+h})
	\]
	This is a closed curve contained within \( U \), hence \( \int_\gamma f(z) \dd{z} = 0 \).
	Thus
	\[
		\int_{\gamma_{w+h}} f(z) \dd{z} = \int_{\gamma_w} f(z) \dd{z} + \int_{\delta_h} f(z) \dd{z}
	\]
	Informally, the integral has an additivity property which is independent of the path taken.
	Rewriting this using \( F \),
	\begin{align*}
		F(w+h) & = F(w) + \int_{\delta_h} f(z) \dd{z}                  \\
		       & = F(w) + \int_{\delta_h} (f(z) + f(w) - f(w)) \dd{z}  \\
		       & = F(w) + hf(w) + \int_{\delta_h} (f(z) - f(w)) \dd{z}
	\end{align*}
	Hence, by continuity of \( f \),
	\begin{align*}
		\abs{\frac{F(w+h) - F(w)}{h} - f(w)}                           & = \frac{1}{\abs{h}} \abs{\int_{\delta_h} (f(z) - f(w)) \dd{z}}                               \\
		                                                               & \leq \frac{1}{\abs{h}} \mathrm{length}(\delta_h) \sup_{z \in \Im \delta_h} \abs{f(z) - f(w)} \\
		                                                               & = \sup_{z \in \Im \delta_h} \abs{f(z) - f(w)}                                                \\
		\therefore\ \lim_{h \to 0} \abs{\frac{F(w+h) - F(w)}{h} - f(w)} & = \lim_{h \to 0} \sup_{z \in \Im \delta_h} \abs{f(z) - f(w)} = 0
	\end{align*}
	Thus, \( F \) is differentiable at \( w \) with \( F'(w) = f(w) \).
\end{proof}

\subsection{Star-shaped domains}
\begin{definition}
	A domain \( U \) is \textit{star-shaped}, or a \textit{star domain}, if there exists a (not necessarily unique) centre \( a_0 \in U \) such that for all \( w \in U \), the straight line segment \( [a_0, w] \) is contained within \( U \).
\end{definition}
\begin{remark}
	Any disc is convex; any convex domain is star-shaped; any star-shaped domain is path-connected.
	The reverse implications are not true in general.
\end{remark}
\begin{definition}
	A \textit{triangle} in \( \mathbb C \) is the \textit{convex hull} of three points in \( \mathbb C \).
	The (closed) convex hull of a set \( S \) is the smallest (closed) convex set \( C \) such that \( S \subseteq C \).
	In this case, if \( z_1, z_2, z_3 \in \mathbb C \), we have
	\[
		T = \qty{az_1 + bz_2 + cz_3 \colon 0 \leq a,b,c \leq 1, a+b+c=1}
	\]
	When used as a curve, the boundary \( \partial T \) represents the piecewise affine closed curve \( \gamma = \gamma_1 + \gamma_2 + \gamma_3 \) where \( \gamma_i \) are affine functions parametrising the three line segments on the boundary of \( T \).
\end{definition}
\begin{corollary}
	Let \( U \) be a star-shaped domain.
	Let \( f \colon U \to \mathbb C \) be continuous and \( \int_{\partial T} f(z) \dd{z} = 0 \) for any triangle \( T \subset U \).
	Then \( f \) has an antiderivative in \( U \).
\end{corollary}
\begin{remark}
	This is a relaxation of the conditions from the previous theorem.
\end{remark}
\begin{proof}
	Let \( a_0 \) be a centre for the domain \( U \).
	Let \( w \) be an arbitrary point in \( U \).
	Then let \( \gamma_w \) be the affine function parametrising the directed line segment \( [a_0,w] \), and let \( F(w) = \int_{\gamma_w} f(z) \dd{z} \).
	Using \( h \) and \( \delta_h \) as above, by letting \( \gamma = \gamma_w + \delta_h + (-\gamma_{w+h}) \) we then have \( \int f(z) \dd{z} = \pm \int_{\partial T} f(z) \dd{z} \) for a triangle \( T \subset U \).
	Since the integral around a triangle is zero by hypothesis, \( \int_\gamma f(z) \dd{z} = 0 \).
	We then complete the proof in analogous way to the general case.
\end{proof}
\begin{theorem}[Cauchy's theorem for triangles]
	Let \( U \subset \mathbb C \) be an open set and \( f \colon U \to \mathbb C \) be a holomorphic function.
	Then \( \int_{\partial T} f(z) \dd{z} = 0 \) for all triangles \( T \subset U \).
\end{theorem}
\begin{proof}
	Let \( \eta(t) = \int_{\partial T} f(z) \dd{z} \).
	We will subdivide the triangle \( T \) into four smaller triangles \( T^{(1)}, T^{(2)}, T^{(3)}, T^{(4)} \).
	The vertices of the inner triangle are the midpoints of the sides of \( T \), and the three other triangles are constructed to fill the remaining area of \( T \).
	Thus,
	\[
		\eta(T) = \int_{\partial T^{(1)}} f(z) \dd{z} + \int_{\partial T^{(2)}} f(z) \dd{z} + \int_{\partial T^{(3)}} f(z) \dd{z} + \int_{\partial T^{(4)}} f(z) \dd{z}
	\]
	Then, by the triangle inequality, there exists a triangle \( T^{(j)} \) such that
	\[
		\abs{\int_{\partial T^{(j)}} f(z) \dd{z}} \geq \frac{\abs{\eta(T)}}{4}
	\]
	Let \( T_0 = T \), and \( T_1 = T^{(j)} \), so \( \abs{\eta(T_1)} \geq \frac{1}{4}\abs{\eta(T_0)} \).
	We can show geometrically that for any choice of \( T_i \), \( \mathrm{length}(\partial T_1) = \frac{1}{2}\mathrm{length}(\partial T_0) \).
	Inductively, we can subdivide \( T_i \) and produce \( T_{i+1} \), such that
	\[
		T_0 \supset T_1 \supset \cdots;\quad \abs{\eta(T_n)} \geq \frac{1}{4}\abs{\eta(T_{n-1})};\quad \mathrm{length}(\partial T_n) = \frac{1}{2} \mathrm{length}(\partial T_{n-1})
	\]
	Hence,
	\[
		\abs{\eta(T_n)} \geq \frac{1}{4^n}\abs{\eta(T_0)};\quad \mathrm{length}(\partial T_n) = \frac{1}{2^n} \mathrm{length}(\partial T_0)
	\]
	Since \( T_n \) are non-empty, nested closed subsets with diameter converging to zero, we can show that \( \bigcap_{n=1}^\infty T_n = \qty{z_0} \) for some \( z_0 \in \mathbb C \).
	Let \( \varepsilon > 0 \).
	Since \( f \) is differentiable at \( z_0 \), there exists \( \delta > 0 \) such that
	\begin{align*}
		z \in U, \abs{z - z_0} < \delta & \implies \abs{\frac{f(z) - f(z_0)}{z - z_0} - f'(z_0)} \leq \varepsilon        \\
		                                & \implies \abs{f(z) - f(z_0) - f'(z_0)(z - z_0)} \leq \varepsilon \abs{z - z_0}
	\end{align*}
	Now, observe that for all \( n \),
	\[
		\int_{\partial T_n} f(z) \dd{z} = \int_{\partial T_n} (f(z) - f(z_0) - f'(z_0)(z - z_0)) \dd{z}
	\]
	since \( \int_{\partial T_n} \dd{z} = \int_{\partial T_n} z \dd{z} = 0 \) by the fundamental theorem of calculus.
	Let \( n \) such that \( T_n \subset D(z_0, \delta) \).
	Hence,
	\begin{align*}
		\frac{1}{4^n} \abs{\eta(T_0)} & \leq \abs{\eta(T_n)}                                                                                    \\
		                              & = \abs{\int_{\partial T_n} f(z) \dd{z}}                                                                 \\
		                              & = \abs{\int_{\partial T_n} (f(z) - f(z_0) - f'(z_0)(z - z_0)) \dd{z}}                                   \\
		                              & \leq \qty(\sup_{z \in \partial T_n} \abs{f(z) - f(z_0) - f'(z_0)(z-z_0)}) \mathrm{length}(\partial T_n) \\
		                              & \leq \varepsilon \qty(\sup_{z \in \partial T_n} \abs{z - z_0}) \mathrm{length}(\partial T_n)            \\
		                              & \leq \varepsilon \cdot \mathrm{length}(\partial T_n)^2                                                  \\
		                              & = \frac{\varepsilon}{4^n} \mathrm{length}(\partial T_0)^2                                               \\
		\therefore\ \abs{\eta(T_0)}    & \leq \varepsilon \cdot \mathrm{length}(\partial T_0)^2
	\end{align*}
	\( \varepsilon \) was arbitrary, hence \( \eta(T_0) \) must be zero.
\end{proof}
We can generalise the above theorem for functions that are holomorphic except at a finite number of points.
\begin{theorem}
	Let \( U \subset \mathbb C \) be an open set and \( f \colon U \to \mathbb C \) be a continuous function.
	Let \( S \subset U \) be a finite set and suppose that \( f \) is holomorphic on \( U \setminus S \).
	Then \( \int_{\partial T} f(z) \dd{z} = 0 \) for all triangles \( T \subset U \).
\end{theorem}
\begin{proof}
	By the procedure above, we can subdivide \( T \) into a total of \( 4^n \) smaller triangles; at each step we join the midpoints of the sides of the triangles of the previous step.
	We will keep all of the smaller triangles, and let the sequence of such smaller triangles be denoted \( T_1, \dots, T_N \).
	Then, since the integrals along the sides of the smaller triangles that are interior to \( T \) cancel, we have
	\[
		\int_{\partial T} f(z) \dd{z} = \sum_{j=1}^N \int_{\partial T_j} f(z) \dd{z}
	\]
	By the previous theorem, \( \int_{\partial T_j} f(z) \dd{z} = 0 \) unless \( T_j \) intersects with \( S \).
	So by letting \( I = \qty{j \colon T_j \cap S \neq \varnothing} \), we have
	\[
		\int_{\partial T} f(z) \dd{z} = \sum_{j \in I} \int_{\partial T_j} f(z) \dd{z}
	\]
	Since any point may be in at most six of the smaller triangles, and \( \mathrm{length}(\partial T_j) = \frac{1}{2^n} \mathrm{length}(\partial T) \), we find
	\[
		\abs{\int_{\partial T} f(z) \dd{z}} \leq 6\abs{S} \qty(\sup_{z \in T} \abs{f(z)}) \frac{\mathrm{length}(\partial T)}{2^n}
	\]
	Then let \( n \to \infty \) and the result then holds as rqeuired.
\end{proof}
We can now prove the `convex Cauchy' theorem.
\begin{corollary}[Cauchy's theorem for convex sets]
	Let \( U \subset \mathbb C \) be convex, or more generally, a star domain.
	Let \( f \colon U \to \mathbb C \) be continuous on \( U \) and holomorphic in \( U \setminus S \) where \( S \) is a finite set.
	Then \( \int_\gamma f(z) \dd{z} = 0 \) for any closed curve \( \gamma \) in \( U \).
\end{corollary}
\begin{proof}
	By the theorems above, \( \int_{\partial T} f(z) \dd{z} = 0 \) for any triangle \( T \subset U \).
	Since \( U \) is a star domain and \( f \) is continuous, this means that \( f \) has an antiderivative in \( U \).
	The result then follows from the fundamental theorem of calculus.
\end{proof}
\begin{remark}
	We will soon show that if \( f \colon U \to \mathbb C \) is continuous and holomorphic in \( U \setminus S \) where \( S \) is finite, then \( f \) is holomorphic in \( U \).
\end{remark}

\subsection{Cauchy's integral formula}
For a disc \( D(a,\rho) \) we will write \( \int_{\partial D(a,\rho)} f(z) \dd{z} \) to mean \( \int_\gamma f(z) \dd{z} \) where \( \gamma \colon [0,1] \to \mathbb C \) is the curve \( \gamma(t) = a+\rho e^{2\pi i t} \).
\begin{theorem}[Cauchy's integral formula for a disc]
	Let \( D = D(a,r) \) and let \( f \colon D \to \mathbb C \) be holomorphic.
	Then, for any \( \rho \) with \( 0 < \rho < r \) and any \( w \in D(a,\rho) \), we have
	\[
		f(w) = \frac{1}{2\pi i} \int_{\partial D(a,\rho)} \frac{f(z) \dd{z}}{z-w}
	\]
	In particular, taking \( w = a \),
	\[
		f(a) = \frac{1}{2\pi i} \int_{\partial D(a,\rho)} \frac{f(z) \dd{z}}{z-a} = \int_0^1 f(a+\rho e^{2\pi i t}) \dd{t}
	\]
	This final equation is called the \textit{mean value property} for holomorphic functions.
\end{theorem}
We first need the following lemma.
\begin{lemma}
	If \( \gamma \colon [a,b] \to \mathbb C \) is a curve and \( (f_n) \) is a sequence of continuous complex functions on \( \Im \gamma \) converging uniformly to \( f \) on \( \Im\gamma \), then \( \int_\gamma f_n(z) \dd{z} \to \int_\gamma f(z) \dd{z} \).
\end{lemma}
\begin{proof}
	We have
	\[
		\abs{\int_\gamma f_n(z) \dd{z} - \int_\gamma f(z) \dd{z}} = \abs{\int_\gamma (f_n(z) - f(z)) \dd{z}} \leq \sup_{z \in \Im \gamma} \abs{f_n(z) - f(z)} \mathrm{length}(\gamma)
	\]
\end{proof}
We can now prove Cauchy's integral formula for a disc.
\begin{proof}
	Let \( w \in D(a,\rho) \) be fixed, and define \( h \colon D \to \mathbb C \) by
	\[
		h(z) = \begin{cases}
			\frac{f(z) - f(w)}{z - w} & \text{if } z \neq w \\
			f'(w)                     & \text{if } z = w
		\end{cases}
	\]
	Then \( h \) is continuous on \( D \) and holomorphic in \( D \setminus \qty{w} \).
	By Cauchy's theorem for convex sets,
	\[
		\int_{\partial D(a,\rho)} h(z) \dd{z} = 0
	\]
	Substituting for \( h \), we find
	\[
		f(w) \int_{\partial D(a,\rho)} \frac{\dd{z}}{z-w} = \int_{\partial D(a,\rho)} \frac{f(z) \dd{z}}{z-w}
	\]
	It now suffices to prove that
	\[
		\int_{\partial D(a,\rho)} \frac{\dd{z}}{z-w} = 2 \pi i
	\]
	Note that
	\[
		\frac{1}{z-w} = \frac{1}{z-a+a-w} = \frac{1}{\qty(z-a)\qty(1 - \frac{w-a}{z-a})} = \sum_{j=0}^\infty \frac{(w-a)^j}{(z-a)^{j+1}}
	\]
	where the convergence is uniform for \( z \in \partial D(a,\rho) \) by the Weierstrass \( M \)-test.
	Therefore, by the above lemma, we interchange summation and integration to find
	\[
		\int_{\partial D(a,\rho)} \frac{\dd{z}}{z-w} = \sum_{j=0}^\infty (w-a)^j \int_{\partial D(a,\rho)} \frac{\dd{z}}{(z-a)^{j+1}}
	\]
	For \( j \geq 1 \), the function \( \frac{1}{(z-a)^{j+1}} \) has an antiderivative in a neighbourhood of \( \partial D(a,\rho) \), hence all integrals on the right hand side for \( j \geq 1 \) vanish.
	For \( j = 0 \), we can compute directly that \( \int_{\partial D(a,\rho)} \frac{\dd{z}}{z-a} = 2 \pi i \).
	Hence, \( \int_{\partial D(a,\rho)} \frac{\dd{z}}{z-w} = 2 \pi i \), proving Cauchy's intgeral formula.

	Now, taking \( w = a \) in Cauchy's integral formula, we find
	\[
		f(a) = \frac{1}{2\pi i} \int_{\partial D(a,\rho)} \frac{f(z) \dd{z}}{z-a}
	\]
	By direct computation using the parametrisation \( t \mapsto a + \rho e^{2\pi i t} \) for \( t \in [0,1] \), we find
	\[
		f(a) = \int_0^1 f(a+\rho e^{2 \pi i t}) \dd{t}
	\]
	as required.
\end{proof}

\subsection{Liouville's theorem}
\begin{theorem}
	Let \( f \colon \mathbb C \to \mathbb C \) be entire and bounded.
	Then \( f \) is constant.
	More generally, if \( f \) is entire with sublinear growth (there exist \( K \geq 0 \) and \( \alpha < 1 \) such that \( \abs{f(z)} \leq K(1+\abs{z}^\alpha) \) for all \( z \in \mathbb C \)) then \( f \) is constant.
\end{theorem}
\begin{proof}
	Let \( w \in \mathbb C \) and \( \rho > \abs{w} \).
	By Cauchy's integral formula, we have
	\[
		f(w) = \frac{1}{2 \pi i} \int_{\partial D(0,\rho)} \frac{f(z)\dd{z}}{z-w};\quad f(0) = \frac{1}{2 \pi i} \int_{\partial D(0,\rho)} \frac{f(z) \dd{z}}{z}
	\]
	Thus,
	\begin{align*}
		\abs{f(w) - f(0)} & = \frac{1}{2\pi} \abs{\int_{\partial D(0,\rho)} \frac{wf(z) \dd{z}}{z(z-w)}}                                                                            \\
		                  & \leq \frac{\abs{w}}{2 \pi} \sup_{z \in \partial D(0,\rho)} \frac{\abs{f(z)}}{\abs{z} \cdot \abs{\abs{z} - \abs{w}}} \mathrm{length}(\partial D(0,\rho)) \\
		                  & \leq \frac{\abs{w} K(1+\rho^\alpha)}{2\pi \rho(\rho - \abs{w})} 2 \pi \rho                                                                              \\
		                  & = \frac{\abs{w}K(1+\rho^\alpha)}{\rho - \abs{w}}
	\end{align*}
	By letting \( \rho \to \infty \), we can conclude \( f(w) = f(0 )\).
\end{proof}
\begin{theorem}[fundamental theorem of algebra]
	Every non-constant polynomial with complex coefficients has a complex root.
\end{theorem}
\begin{proof}
	Let \( p(z) = a_n z^n + \dots + a_0 \) be a complex polynomial of degree \( n \geq 1 \).
	Then \( a_n \neq 0 \), and for \( z \neq 0 \) we can write
	\[
		p(z) = z^n \qty(a_n + \frac{a_{n-1}}{z} + \dots + \frac{a_0}{z^n} )
	\]
	By the triangle inequality,
	\[
		\abs{p(z)} \geq \abs{z}^n \qty(\abs{a_n} - \frac{\abs{a_{n-1}}}{\abs{z}} - \dots - \frac{\abs{a_0}}{\abs{z}^n})
	\]
	Hence, there exists \( R > 0 \) such that \( \abs{p(z)} \geq 1 \) for \( \abs{z} > R \).

	Now, if \( p(z) \neq 0 \) for all \( z \), then \( g(z) = \frac{1}{p(z)} \) is entire.
	By the above, \( \abs{g(z)} \leq 1 \) for \( \abs{z} > R \).
	By continuity of \( g \), we have further that \( \abs{g(z)} \) is bounded from above on the compact set \( \qty{\abs{z} \leq R} \).
	Hence, \( g \) is a bounded entire function.
	By Liouville's theorem, \( g \) is constant.
	Since \( p \) is non-constant, this is a contradiction.
	Hence \( p \) has a zero.
\end{proof}
\begin{theorem}[local maximum modulus principle]
	Let \( f \colon D(a,R) \to \mathbb C \) be holomorphic, and \( \abs{f(z)} \leq \abs{f(a)} \) for all \( z \in D(a,R) \).
	Then \( f \) is constant.
\end{theorem}
\begin{proof}
	By the mean value property,
	\[
		f(a) = \int_0^1 f(a+\rho e^{2 \pi i t}) \dd{t}
	\]
	Therefore,
	\[
		\abs{f(a)} = \abs{\int_0^1 f(a + \rho e^{2 \pi i t}) \dd{t}} \leq \sup_{t \in [0,1]} \abs{f(a+\rho e^{2 \pi i t})} \leq \abs{f(a)}
	\]
	where the last inequality is by hypothesis.
	Therefore, both inequalities must be equalities.
	Equality in the first inequality implies that \( f(a+\rho e^{2 \pi i t}) = c_\rho \) for some constant \( c_\rho \) and all \( t \in [0,1] \).
	Then, by the first equality, \( \abs{c_\rho} = \abs{f(a)} \) for all \( \rho \in (0,R) \).
	Thus, \( \abs{f(a+\rho e^{2 \pi i t})} \) is constant for all \( \rho \in (0,R) \) and \( t \in [0,1] \).
	Hence \( \abs{f(z)} \) is constant on \( D(a,R) \).
	By the Cauchy--Riemann equations, \( f \) must be constant.
\end{proof}

\subsection{Taylor series}
\begin{theorem}
	Let \( f \colon D(a,R) \to \mathbb C \) be holomorphic.
	Then \( f \) has a convergent power series representation on \( D(a,R) \).
	More precisely, there exists a sequence of complex numbers \( c_0, c_1, \dots \) such that
	\[
		f(w) = \sum_{n=0}^\infty c_n (w-a)^n
	\]
	The coefficient \( c_n \) is given by
	\[
		c_n = \frac{1}{2\pi i} \int_{\partial D(a,\rho)} \frac{f(z) \dd{z}}{(z-a)^{n+1}}
	\]
	for any \( \rho \in (0,R) \).
\end{theorem}
\begin{proof}
	Let \( 0 < \rho < R \).
	Then, for any \( w \in D(0,\rho) \), we have by Cauchy's integral formula that
	\begin{align*}
		f(w) & = \frac{1}{2\pi i}\int_{\partial D(a,\rho)} \frac{f(z) \dd{z}}{z-w}                                           \\
		     & = \frac{1}{2\pi i}\int_{\partial D(a,\rho)} f(z) \sum_{n=0}^\infty \frac{(w-a)^n}{(z-a)^{n+1}} \dd{z}         \\
		     & = \sum_{n=0}^\infty \qty( \frac{1}{2\pi i}\int_{\partial D(a,\rho)} \frac{f(z) \dd{z}}{(z-a)^{n+1}} ) (w-a)^n \\
	\end{align*}
	The last equality holds since the series under the integral converges uniformly for all \( z \in \partial D(a,\rho) \).
	Let
	\[
		c_n(\rho) = \frac{1}{2\pi i} \int_{\partial D(a,\rho)} \frac{f(z) \dd{z}}{(z-a)^{n+1}}
	\]
	Then we have shown that \( f(w) = \sum_{n=0}^\infty c_n(\rho)(w-a)^{n+1} \) for all \( w \in D(a,\rho) \).
	By a previous theorem, the function \( f \) has derivatives of all orders in \( D(a,\rho) \) and hence \( c_n(\rho) = \frac{f^{(n)}(a)}{n!} \), which is independent of \( \rho \), so we can let \( c_n = c_n(\rho) \) for an arbitrary \( \rho \).
\end{proof}
\begin{corollary}
	If \( f \) is holomorphic on an open set \( U \subset \mathbb C \), then \( f \) has derivatives of all orders in \( U \), and those derivatives are holomorphic on \( U \).
\end{corollary}
\begin{proof}
	We have a power series representation for \( f \) near every points, so its derivatives of all orders exist everywhere.
	Hence, the derivatives of all orders are holomorphic.
\end{proof}
\begin{remark}
	We can explicitly compute from the \( c_n \) above that
	\[
		f^{(n)}(a) = \frac{n!}{2\pi i}\int_{\partial D(a,\rho)} \frac{f(z) \dd{z}}{(z-a)^{n+1}}
	\]
	This is a special case of a Cauchy integral formula for derivatives.

	Note also that by taking \( n = 1 \), we can apply the estimate for the integral to find
	\[
		\abs{f'(a)} \leq \frac{1}{\rho}\qty(\sup_{z \in \partial D(a,\rho)} \abs{f(z)})
	\]
	This can be thought of as a localised version of Liouville's theorem, and it directly implies Liouville's theorem.
	Indeed, if \( f \) is entire and bounded, let \( a \in \mathbb C \) and by applying the estimate and letting \( \rho \to \infty \) we can conclude \( f' = 0 \) on \( \mathbb C \), giving that \( f \) is constant.
\end{remark}
\begin{definition}
	A function \( f \) is \textit{analytic} at a point \( a \in \mathbb C \) (or \( \mathbb R \)) if there exists a neighbourhood of \( a \) such that \( f \) is given by a convergent power series about \( a \).
\end{definition}
\begin{remark}
	If \( f \) is analytic at \( a \), we must have derivatives of all orders of \( f \) near \( a \).
	The above corollary implies that if \( f \) is complex, the following are equivalent.
	\begin{enumerate}
		\item \( f \) is analytic at \( a \)
		\item \( f \) has complex derivatives of all orders in a neighbourhood of \( a \)
		\item \( f \) is complex differentiable once in a neighbourhood in a neighbourhood of \( a \) (so \( f \) is holomorphic at \( a \))
	\end{enumerate}
	For real functions, this is not the case.
	For example, consider \( f \colon \mathbb R \to \mathbb R \) defined by \( f(x) = \exp(-x^{-2}) \).
	This has \( f^{(n)}(0) = 0 \) for all \( n \), so \( f \) is not given by a convergent power series near zero.

	Let \( U \subset \mathbb C \) be an open set.
	Now, we have that \( f = u+iv \) is holomorphic in \( U \) if and only if \( u \) and \( v \) have continuous partial derivatives in \( U \), and that \( u.v \) satisfy the Cauchy--Riemann equations.
	Further, the corollary above implies that \( u, v \) are \( C^2 \) functions.
	This shows that \( u \) and \( v \) are harmonic.
\end{remark}
\begin{theorem}[Morera's theorem]
	Let \( U \subseteq \mathbb C \) be open, and \( f \colon U \to \mathbb C \) be a continuous function such that \( \int_\gamma f(z) \dd{z} = 0 \) for all closed curves \( \gamma \) in \( U \).
	Then \( f \) is holomorphic in \( U \).
\end{theorem}
\begin{remark}
	This can be thought of as a converse to Cauchy's theorem.
\end{remark}
\begin{proof}
	We know that \( f \) has a holomorphic antiderivative \( F \) on \( U \).
	Then, we know that \( F \) is twice differentiable in \( U \).
	Since \( F' = f \), \( f \) is holomorphic.
\end{proof}
\begin{corollary}
	Let \( U \subseteq \mathbb C \) be an open set.
	Let \( f \colon U \to \mathbb C \) be a continuous function and holomorphic in \( U \setminus S \), where \( S \) is a finite set.
	Then \( f \) is holomorphic in \( U \).
\end{corollary}
\begin{proof}
	For all \( a \in U \), there exists \( r > 0 \) such that \( D = D(a,r) \subset U \).
	Since \( D \) is convex, we can apply Cauchy's formula for convex sets to observe that \( \int_\gamma f(z) \dd{z} = 0 \) for all closed curves in \( D \).
	Then by Morera's theorem, \( f \) is holomorphic.
\end{proof}

\subsection{Zeroes of holomorphic functions}
\begin{definition}
	Let \( f \) be a holomorphic function on a disc \( D = D(a,R) \).
	By the Taylor series theorem, there exist constants \( c_n \) such that
	\[
		f(z) = \sum_{n=0}^\infty c_n (z-a)^n
	\]
	for all \( z \in D \).
	Then if \( f \) is not identically zero, there exists \( n \) such that \( c_n \neq 0 \).
	Let \( m = \min \qty{ n \colon c_n \neq 0 } \).
	Then,
	\[
		f(z) = (z-a)^m g(z);\quad g(z) = \sum_{n=m}^\infty c_n (z-a)^{n-m}
	\]
	Note that \( g \) is holomorphic on \( D \), and \( g(a) = c_m \neq 0 \).

	If \( m \neq 0 \), we say that \( f \) has a \textit{zero of order \( m \) at \( z = a \)}.
	Hence \( m \) is the smallest natural number \( n \) such that \( f^{(n)}(a) \neq 0 \).
	If \( S \subseteq \mathbb C \), then a point \( w \in S \) is an \textit{isolated point} of \( S \) if there exists \( r > 0 \) such that \( S \cap D(w,r) = \qty{w} \).
\end{definition}
\begin{theorem}[principle of isolated zeroes]
	Let \( f \colon D(a,R) \to \mathbb C \) be holomorphic and not identically zero.
	Then there exists \( r \in (0,R) \) such that \( f(z) \neq 0 \) whenever \( 0 < \abs{z-a} < r \).
\end{theorem}
\begin{remark}
	If \( f(a) = 0 \), then \( \qty{z \colon f(z) = 0} \) intersects \( D(a,r) \) only at \( a \).
	Hence, \( a \) is an isolated point of the set of zeroes.
	For instance, there exists no nonzero holomorphic function that vanishes on a line segment or a disc.

	We can show that certain identities from real analysis hold for complex functions.
	For instance, consider the function \( g(z) = \sin^2 z + \cos^2 z - 1 \).
	Since this \( g \) is holomorphic and vanishes on the real line, \( g \) must be identically zero in the complex plane.

	The zero set may have an \textit{accumulation point} on the boundary of the domain of \( f \).
	Consider \( f(z) = \sin \frac{1}{z} \) for \( z \in D(1,1) \).
	Here, if \( a_n = \frac{1}{2n \pi} \), then \( a_n \in D(1,1) \) and \( f(a_n) = 0 \) and \( a_n \to 0 \in \partial D(1,1) \).
\end{remark}
\begin{proof}
	If \( f(a) \neq 0 \), then by continuity of \( f \) there exists \( r > 0 \) such that \( f(z) \neq 0 \) for all \( z \in D(a,r) \).
	If \( f(a) = 0 \), then there exists an integer \( m \geq 1 \) such that \( f(z) = (z-a)^m g(z) \) for \( z \in D(a,R) \), where \( g \) is holomorphic with \( g(a) \neq 0 \).
	In this case, we find that there exists \( r > 0 \) such that \( g(z) \neq 0 \) for \( z \in D(a,r) \) and hence \( f(z) \neq 0 \) for \( z \in D(a,r) \setminus \qty{a} \).
\end{proof}

\subsection{Analytic continuation}
\begin{theorem}
	Let \( U \subset V \) be domains.
	If \( g_1, g_2 \colon V \to \mathbb C \) are analytic and \( g_1 = g_2 \) on \( U \), then \( g_1 = g_2 \) on \( V \).
	Equivalently, if \( f \colon U \to \mathbb C \) is analytic, then there is at most one analytic function \( g \colon V \to \mathbb C \) such that \( g = f \) on \( U \).
	We say that \( g \) is the \textit{analytic continuation} of \( f \) to \( V \), if it exists.
\end{theorem}
\begin{proof}
	Let \( g_1, g_2 \colon V \to \mathbb C \) be analytic with \( \eval{g_1}_U = \eval{g_2}_U \).
	Then, \( h = g_1 - g_2 \colon V \to \mathbb C \) is analytic, and \( \eval{h}_U \equiv 0 \).
	We want to show that \( h \equiv 0 \).
	Let
	\[
		V_0 = \qty{z \in V \colon \exists r > 0, \eval{h}_{D(z,r)} \equiv 0}
	\]
	and
	\[
		V_1 = \qty{z \in V \colon \exists n \geq 0, h^{(n)}(z) \neq 0}
	\]
	Let \( z \in V \) and suppose that \( z \not\in V_0 \).
	Then for any disc \( D = D(z,r) \subset V \), we have \( h \not\equiv 0 \) in \( D \).
	Hence, by Taylor series, \( h^{(n)}(z) \neq 0 \) for some \( n \), so \( z \in V_1 \).
	Thus, \( V = V_0 \cup V_1 \).
	We also know that \( V_0 \cap V_1 = \varnothing \).

	Note that \( V_0 \) is open by definition, and \( V_1 \) is by continuity of the derivatives \( h^{(n)} \).
	By connectedness of the domain \( V \), either \( V_0 \) or \( V_1 \) is empty.
	Since \( U \subset V_0 \), we must have \( V_1 = \varnothing \).
	Thus, \( V = V_0 \) so \( h \equiv 0 \).
\end{proof}
\begin{remark}
	The above proof does not rely on holomorphicity but on analyticity.
	Thus, the theorem holds for real analytic functions.
	For example, due to \textit{elliptic regularity} (see Part II Analysis of Functions), we can show that harmonic functions are real analytic, and hence have a unique analytic continuation if one exists.
\end{remark}
Given a holomorphic function \( f \) defined on a disc, we can compute the largest domain containing the disc to which there exists an analytic continuation of \( f \).
This is nontrivial to answer in general.
\begin{example}
	Let \( f(z) = \sum_{n=0}^\infty z^n \).
	The radius of convergence of this series is 1, so \( f \) is analytic in \( D(0,1) \), and there is no larger \textit{disc} \( D(0,r) \supset D(0,1) \) such that \( g \) has an analytic continuation to \( D(0,r) \).
	However, since \( f(z) = \frac{1}{1-z} \) for \( z \in D(0,1) \) and the function \( \frac{1}{1-z} \) is analytic in \( \mathbb C \setminus \qty{1} \), \( f \) indeed has an analytic continuation to the larger domain \( \mathbb C \setminus \qty{1} \).
\end{example}
\begin{example}
	Let \( f(z) = \sum_{n=1}^\infty \frac{(-1)^{n+1} z^n}{n} \).
	This function also has a radius of convergence of 1, so \( f \) is analytic on \( D(0,1) \).
	It has analytic continuation \( \Log(1+z) \) to the domain \( \mathbb C \setminus \qty{x \in \mathbb R \colon x \leq -1} \) containing \( D(0,1) \).
\end{example}
\begin{example}
	Let \( f(z) = \sum_{n=0}^\infty z^{n!} \).
	This has radius of convergence 1, so \( f \) is analytic in \( D(0,1) \).
	However, \( f \) has no analytic continuation to any larger domain containing \( D(0,1) \).
	The boundary \( \partial D(0,1) \) is known as the \textit{natural boundary} of \( f \).
\end{example}
We can find in fact that for any given domain \( U \subset \mathbb C \), there exists a holomorphic function \( f \colon U \to \mathbb C \) which has no analytic continuation to a domain properly containing \( U \).

The failure of analytic continuation in some cases can be explained as the result of loss of a regularity condition, such as boundedness, continuity, differentiability, or so on.
However, this is not always the reason, and analytic continuation may remain impossible even when regularity conditions are all satisfied.
\begin{example}
	Let \( f(z) = \sum_{n=0}^\infty \exp(-2^{n/2}) z^{2^n} \), which has unit radius of convergence.
	\( f \), and its derivatives of any order, are uniformly continuous on the closed disc \( \overline{D(0,1)} \).
	However, we can prove that it has natural boundary \( \partial D(0,1) \), using the following theorem which will not be proven.
	\begin{theorem}[Ostrowski--Hadamard gap theorem]
		Let \( (p_n) \) be a sequence of positive integers such that \( p_{n+1} > (1+\delta)p_n \) for all \( n \) and some fixed \( \delta > 0 \).
		If \( (c_n) \) is a sequence of complex numbers such that \( f(z) = \sum_{n=0}^\infty c_n z^{p_n} \) has unit radius of convergence, then \( \partial D(0,1) \) is the natural boundary of \( f \).
	\end{theorem}
\end{example}
\begin{corollary}[identity principle]
	Let \( f, g \colon U \to \mathbb C \) be holomorphic functions in a domain \( U \).
	If the set \( S = \qty{z \in U \colon f(z) = g(z)} \) contains a non-isolated point, then \( f = g \) in \( U \).
\end{corollary}
\begin{proof}
	Let \( h = f - g \), so \( S = \qty{z \in U \colon h(z) = 0} \).
	Suppose that \( S \) has a non-isolated point \( w \).
	If there exists \( r > 0 \) such that \( h \not\equiv 0 \) in \( D(w,r) \), then by the principle of isolated zeroes, we can find \( \varepsilon > 0 \) such that \( f(z) \neq 0 \) whenever \( 0 < \abs{z-w} < \varepsilon \).
	However, this contradicts the assumption that \( w \) is a non-isolated point of \( S \).
	Thus, \( h \equiv 0 \) on \( D(w,r) \) for all \( D(w,r) \subset U \).
	Thus, \( h \equiv 0 \) on \( U \), so \( f = g \) on \( U \).
\end{proof}
\begin{corollary}[global maximum principle]
	Let \( U \) be a bounded open set.
	Suppose \( f \colon \overline U \to \mathbb C \) is a continuous function such that \( f \) is holomorphic in \( U \).
	Then \( \abs{f} \) attains its maximum on \( \partial U \).
\end{corollary}
\begin{proof}
	\( \overline U \) is compact, and \( \abs{f} \) is continuous on \( \overline U \).
	Hence, it attains its maximum; there exists \( w \in \overline U \) such that \( \abs{f(w)} = \max_{z \in \overline U} \abs{f(z)} \).
	If \( w \not\in U \), then \( w \in \partial U \) as required.
	Otherwise, let \( D = D(w,r) \subset U \).
	Since \( \abs{f(z)} \leq \abs{f(w)} \) for all \( z \in D \), the local maximum principle implies that \( f \) is constant on \( D \).
	Hence, by the identity principle, \( f \) is constant on the connected component of \( U \) containing \( D \), which will be written \( U' \).
	By continuity, \( f \) is constant on the closure of this connected component \( \overline{U'} \).
	In particular, \( \abs{f(z)} = \abs{f(w)} \) for all \( z \in \partial U' \subseteq \partial U \) as required.
\end{proof}
\begin{theorem}[Cauchy's integral formula for derivatives]
	Let \( f \colon D(a,R) \to \mathbb C \) be holomorphic.
	For any \( \rho \in (0,R) \) and \( w \in D(a,\rho) \), we have
	\[
		f^{(k)}(w) = \frac{k!}{2\pi i} \int_{\partial D(a,\rho)} \frac{f(z) \dd{z}}{(z-w)^{k+1}}
	\]
	Further,
	\[
		\sup_{z \in D(a,R/2)} \abs{f^{(k)}(z)} \leq \frac{C}{R^k} \sup_{z \in D(a,R)} \abs{f(z)}
	\]
	where \( C = k!
	2^{k+1} \) is a constant which depends only on \( k \).
	This final result is called a Cauchy estimate for the \( k \)th derivative.
\end{theorem}
\begin{remark}
	Directly applying Cauchy's integral formula to \( f^{(n)} \), we find a formula for \( f^{(n)}(w) \) in terms of an integral involving \( f^{(n)} \).
	The significance of the above theorem is that the integral involves \( f \) alone, and not its derivatives.

	Note that we have already observed the special case \( w = a \).
	This was proven during the discussion on Taylor series.
\end{remark}
\begin{proof}
	If \( k = 0 \), we have the usual Cauchy integral formula.
	For \( k = 1 \), let \( g(z) = \frac{f(z)}{z-w} \), which is holomorphic in \( D(a,R) \setminus \qty{w} \), with derivative
	\[
		g'(z) = \frac{f'(z)}{z-w} - \frac{f(z)}{(z-w)^2}
	\]
	Since \( \partial D(a,\rho) \subset D(a,R) \setminus \qty{w} \), we know that \( \int_{\partial D(a,\rho)} g'(z) \dd{z} = 0 \) by the fundamental theorem of calculus.
	Applying the usual Cauchy integral formula to \( f' \),
	\[
		f'(w) = \frac{1}{2\pi i}\int_{\partial D(a,\rho)} \frac{f'(z) \dd{z}}{z-w}
	\]
	Combining these results give the result for \( k = 1 \).
	For higher derivatives, we can proceed by induction.
	Let \( k \geq 2 \), and then suppose the fomula holds for this value of \( k \), for all holomorphic functions \( D(a,R) \to \mathbb C \).
	For any holomorphic function \( f \colon D(a,R) \to \mathbb C \), consider
	\[
		g(z) = \frac{f(z)}{(z-w)^{k+1}} \implies g'(z) = \frac{f'(z)}{(z-w)^{k+1}} - \frac{(k+1)f(z)}{(z-w)^{k+2}}
	\]
	which is defined in \( D(a,R) \setminus \qty{w} \).
	Then, since \( \int_{\partial D(a,\rho)} g'(z) \dd{z} = 0 \), we find
	\[
		\int_{\partial D(a,\rho)} \frac{f'(z) \dd{z}}{(z-w)^{k+1}} = (k+1) \int_{\partial D(a,\rho)} \frac{f(z) \dd{z}}{(z-w)^{k+2}}
	\]
	By substituting \( f' \) into the induction hypothesis,
	\[
		f^{(k+1)}(w) = \frac{k!}{2\pi i} \int_{\partial D(a,\rho)} \frac{f'(z) \dd{z}}{(z-w)^{k+1}}
	\]
	We can then combine the previous two expressions to find
	\[
		f^{(k+1)}(w) = \frac{(k+1)!}{2\pi i} \int_{\partial D(a,\rho)} \frac{f(z) \dd{z}}{(z-w)^{k+2}}
	\]
	as required.

	For the second part, let \( \sup_{z \in D(a,R)} \abs{f(z)} < \infty \) without loss of generality.
	Let \( \rho \in (R/2, R) \).
	Then, by the first part, for all \( w \in D(a,R/2) \) we have
	\[
		\abs{f^{(k)}(w)} \leq \frac{k!}{2\pi} \qty(\sup_{z \in \partial D(a,\rho)} \frac{\abs{f(z)}}{\abs{z-w}^{k+1}}) \mathrm{length}(\partial D(a,\rho))
	\]
	As \( \abs{z-w} \geq \rho - R/2 \) for all \( z \in \partial D(a,\rho) \) and all \( w \in D(a,R/2) \), this implies
	\[
		\sup_{w \in D(a,R/2)} \abs{f^{(k)}(w)} \leq \frac{k!\rho}{(\rho - R/2)^{k+1}} \sup_{z \in D(a,R)} \abs{f(z)}
	\]
	Now, as \( \rho \to R \), the result follows.
\end{proof}

\subsection{Uniform limits of holomorphic functions}
\begin{definition}
	Let \( U \subseteq \mathbb C \) be open, and let \( f_n \colon U \to \mathbb C \) be a sequence of functions.
	We say that \( (f_n) \) converges \textit{locally uniformly} on \( U \) if, for all \( a \in U \), there exists \( r > 0 \) such that \( (f_n) \) converges uniformly on \( D(a,r) \).
\end{definition}
\begin{example}
	Let \( f_n(z) = z^n \).
	Then \( f_n \to 0 \) locally uniformly, but not uniformly.
\end{example}
\begin{proposition}
	\( (f_n) \) converges locally uniformly on an open set \( U \subseteq \mathbb C \) if and only if \( (f_n) \) converges uniformly on each compact subset \( K \subseteq U \).
\end{proposition}
\begin{proof}
	The forward implication is simple, due to the definition of compactness.
	The converse follows since for all \( a \in U \), there exists a compact disc \( \overline{D(a,r)} \subset U \).
\end{proof}
\begin{theorem}[uniform limits of holomorphic functions]
	Let \( U \subseteq \mathbb C \) be open, and \( f_n \colon U \to \mathbb C \) be holomorphic for each \( n \in \mathbb N \).
	If \( (f_n) \) converges locally uniformly on \( U \) to some function \( f \colon U \to \mathbb C \), then \( f \) is holomorphic.

	Further, \( f_n' \to f' \) locally uniformly on \( U \), and by induction, for each \( k \) we have \( f_n^{(k)} \to f^{(k)} \) locally uniformly on \( U \) as \( n \to \infty \).
\end{theorem}
\begin{remark}
	This is not true for real analytic functions.
	The \textit{Weierstrass approximation theorem} states the following.
	Let \( f \colon [a,b] \to \mathbb R \) be a continuous function on a compact interval \( [a,b] \subset \mathbb R \).
	Then, there exists a sequence of polynomials \( (p_n) \) converging uniformly to \( f \) on \( [a,b] \).

	There exist continuous, nowhere differentiable functions \( f \colon [a,b] \to \mathbb R \).
	Applying the Weierstrass approximation theorem to such functions \( f \) shows that the uniform limit of real analytic functions need not have a single point of differentiability.
\end{remark}
\begin{proof}
	Let \( a \in U \) and choose \( r > 0 \) such that \( \overline{D(a,r)} \subset U \) and \( f_n \to f \) uniformly on \( \overline{D(a,r)} \).
	Since the \( f_n \) are continuous, by a result from Analysis and Topology we have that \( f \) is continuous in \( \overline{D(a,r)} \).

	Let \( \gamma \) be a closed curve in \( D(a,r) \).
	Since \( D(a,r) \) is convex, by the convex Cauchy theorem we have \( \int_\gamma f_n(z) \dd{z} = 0 \).
	Since \( f_n \to f \) uniformly on \( D(a,r) \), it follows that
	\[
		\int_\gamma f(z) \dd{z} = \lim_{z \to \infty} \int_\gamma f_n(z) \dd{z} = 0
	\]
	By Morera's theorem, \( f \) is holomorphic in \( D(a,r) \).
	Since \( a \) is arbitrary, \( f \) is holomorphic on all of \( U \).

	Now, let \( a \in U \) be arbitrary and let \( D(a,r) \) be as above.
	We can apply the Cauchy estimate for \( k = 1 \), \( R = r \), applied to the function \( f_n - f \).
	This gives
	\[
		\sup_{z \in D(a,r/2)} \abs{f_n'(z) - f'(z)} \leq \frac{4}{r} \sup_{z \in D(a,r)} \abs{f_n(z) - f(z)}
	\]
	Since the right hand side converges to zero as \( n \to \infty \), the claim follows.
\end{proof}
\begin{remark}
	Many of the key results proven for holomorphic functions have analogues for real harmonic functions on domains not just in \( \mathbb R^2 \) but in \( \mathbb R^n \) for any \( n \).
	For instance:
	\begin{enumerate}
		\item (Liouville's theorem) if \( u \colon \mathbb R^n \to \mathbb R \) is a bounded harmonic function then \( u \) is constant;
		\item (local maximum principle) if \( u \colon D(a,r) \) is a \( C^2 \) harmonic function on an open ball \( D(a,r) \) in \( \mathbb R^n \), and if \( u(x) \leq u(a) \) for all \( x \in D(a,r) \), then \( u \) is constant;
		\item (global maximum principle) a harmonic function on a bounded open set \( U \) that is continuous on \( \overline U \) attains its maximum on \( \partial U \);
		\item harmonic functions are real analytic;
		\item the unique analytic continuation principle holds;
		\item uniform limits of harmonic functions are harmonic;
		\item derivative estimates hold: if \( u \colon D(a,R) \subseteq \mathbb R^n \to \mathbb R \) is harmonic, then
		      \[
			      \sup_{D(a,R/2)} \abs{D^k u} \leq CR^{-k} \sup_{D(a,R)} \abs{u};\quad C = C(n,k)
		      \]
	\end{enumerate}
	For the case \( n = 2 \), the result for harmonic functions can often be deduced directly from the corresponding results for holomorphic functions.
	For instance, for Liouville's theorem, given that \( u \) is a harmonic function on \( \mathbb R^2 \), we find a function \( v \) such that \( u + iv \) is holomorphic on \( \mathbb C \) (which is always possible in a simply connected domain).
	Then \( g = e^f \) is holomorphic with \( \abs{g} = e^u \), so if \( u \) is bounded then \( g \) is bounded.
	By Liouville's theorem for holomorphic functions, \( g \) and hence \( f \) is constant.
\end{remark}
